Skip to content

Add park list for Grouped Note Browsing and JSON Export - #13

Merged
polymorcodeus merged 2 commits into
mainfrom
list-add
Sep 11, 2026
Merged

polymorcodeus merged 2 commits into
mainfrom
list-add

Conversation

@polymorcodeus

Copy link
Copy Markdown
Owner

Summary

Adds park list, a read-only command that lists parked notes grouped by category with frontmatter-style output and a versioned --json envelope for scripted consumers. Introduces a per-category excluded flag so a category like archive stays out of the default listing until explicitly requested.

What's new

  • Listing command - park list (alias ls) renders one banner per category, then one block per note showing filename, category, created, source, and synopsis, ordered oldest-modified first.
  • Filtering - -c, --category restricts the listing to named categories (repeatable) and overrides exclusion; --all includes categories excluded by config.
  • Machine output - --json emits a flat envelope of {schema_version, items} where each item carries filename, path, category, created, source, synopsis, and a UTC RFC 3339 modified; schema_version tracks the contract from park schema.
  • Config exclusion - new per-category excluded boolean; the built-in IPAA config ships with archive excluded.

Usage

Command Purpose
park list list notes grouped by category
park list --all include categories excluded by config
park list -c <category> only list these categories (repeatable)
park list --json emit the versioned JSON envelope

Behavior changes / guardrails

  • Explicit --category overrides the default exclusion and --all; --all only widens the default selection.
  • Unknown --category values exit 2 with the valid list, matching park new and park reclassify.
  • --json always emits items as an array, never null, and reports the folder-derived category so a stale frontmatter category never disagrees with the banner.
  • excluded is encoded with omitempty, so non-excluded categories are unchanged in park config output.
  • Listing is read-only; park assist and the reclassify triage flow are unaffected.

Testing

  • Store tests cover excluded-vs---all selection, explicit-category override, unknown category, empty-group omission, plain formatting, and the JSON envelope (version, fields, UTC modified).
  • CLI dispatch tests cover list, alias ls, --all, --category override, unknown-category exit 2, --json parsing, and --json --category filtering.
  • Config tests cover the archive default and the excluded round-trip through Dump.
  • make check runs fmt, vet, lint, and tests; all green.

@polymorcodeus polymorcodeus self-assigned this Sep 11, 2026
@polymorcodeus
polymorcodeus merged commit 28ad6a7 into main Sep 11, 2026
4 checks passed
@polymorcodeus
polymorcodeus deleted the list-add branch September 11, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant